<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<%
String ctx = request.getContextPath();
%>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>solr管理</title>
  <script src="<%=ctx %>/baseNew/plugins/jQuery/jQuery-2.2.0.min.js"></script>
  <script type="text/javascript">
    var ctx = "<%=ctx %>";
  	$(function(){
  		$('#full-import').click(function(){
  			dataImport(ctx+"/solr/data/fullImport");
  		});
  		$('#delta-import').click(function(){
  			dataImport(ctx+"/solr/data/deltaImport");
  		});
  	});
  	function dataImport(url){
  		$.ajax({
  			url:url,
  			type:'post',
  			success:function(data){
  				alert(data.content);
  			}
  		});
  	}
  </script>
  <style type="text/css">
  .table table{
  	border: solid 1px blue;
  }
  .table td{
  	border: solid 1px blue;
  }
  </style>
</head>
<body>
	<div style="text-align: center;top: 100px;width: 100%;">
			<table class="table">
				<tr>
					<th>序号</th>
					<th>solr数据总量</th>
					<th>库数据总量</th>
					<th>备注</th>
					<th>操作</th>
				</tr>
				<tr>
					<td>1</td>
					<td>${solrCount }</td>
					<td>${infoCount }</td>
					<td>
						<font color="red">
							<c:choose>
								<c:when test="${solrCount eq infoCount }">数据量匹配</c:when>
								<c:otherwise>数据量不匹配，请检查</c:otherwise>
							</c:choose>
						</font>
					</td>
					<td>
						<input type="button" value="全量导入" id="full-import">
						<input type="button" value="增量导入" id="delta-import">
					</td>
				</tr>
			</table>
	</div>
</body>
</html>